import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;

/*
 *@Student 张策
 */
public class Re {
    public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, NoSuchFieldException, NoSuchMethodException, InvocationTargetException {
        Class<?> aClass = Class.forName("Student");
        Constructor<?> constructor = aClass.getConstructor(int.class);

//        Object object = aClass.newInstance();
//        Field name = aClass.getDeclaredField("name");
//        name.setAccessible(true);
//        name.set(object,"hsp");
//        System.out.println(object);
//        System.out.println(name.get(object));

    }
}
class Student{
    public int age;
    private static String name;
    public Student(){

    }

    public Student(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Student{" +
                "age=" + age +" "+name+
                '}';
    }
}
